package com.ftg.learn;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author kangjx
 * @createTime 2022/12/30
 */
@SpringBootApplication
public class ConfigApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ConfigApplication.class ,args);

////        当这个工程启动的时候，我们就可从nacos config 当中预加载一些信息
//        //可以为当前工程提供一些传递的前置参数
//        String username = context.getEnvironment().getProperty("user.name");
//        String userage = context.getEnvironment().getProperty("user.age");
//
//        System.out.println(username);
//        System.out.println(userage);
    }

}
